/*****************************************************************
**                                                             	**
**  Copyright (C) 2004 Amlogic,Inc.                            	**
**  All rights reserved                                        	**
**        Filename : FileList.c /Project:AVOS		       **
**        Revision : 1.1                                       	**
**                                                             	**
*****************************************************************/
#include "../menu.h"
#include "FileListEvent.h"
#include "LogoEvent.h"
#include "./win/NetmenuSetupEvent.h"
#define FILE_Y_OFFSET 125
#define FILE_X_OFFSET 200
INT32S WinFileListMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileListOnShow(hwnd, lpParam) ;
    }
    return 0 ;
}

void SetWinFileListPalette_1080P(void)
{
    YUVENTRY mask_para[4] = {0,0,0,4095};
    AWSetAlphaMask(0,4, mask_para);
    YUVENTRY palette_para[16] = {0x8000 | 16392,0x8000 | 21176,0x8000 | 17752,0x8000 | 16392,17592,19496,19832,19656,19992,18104,17673,17817,15864,15721,15912,9849};
    AWSetPalette(0,16, palette_para);
    return ;
}

void SetWinFileListPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    switch(CurOsdSize){
	case OsdSize1080p:
            RECT WindowRect1080p = {FILE_X_OFFSET,FILE_Y_OFFSET,1920-FILE_X_OFFSET,1080-FILE_Y_OFFSET};
            pControl->winrect = WindowRect1080p;
            CREATEWINDOWPARAM WindowPara1080p = {1,{{0,0,1920,1080},    {0,0,0,0},{0,0,0,0},{0,0,0,0}},{PF_PALETTE_256,0,0,0},    SetWinFileListPalette_1080P};
            AWSendMessage(pControl, WM_WINDOW_RESET_DRAW_AREA, (INT32S)&WindowPara1080p);
            break ;
    }//end of switch
    return;
}

HWND *CreateControlWinFileList_1080P(HWND* pParent,INT8U CurOsdSize)
{
    HWND* pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            CREATEWINDOWPARAM window_para1080p = {1,{{0,0,1920,1080},{0,0,0,0},{0,0,0,0},{0,0,0,0}},{PF_PALETTE_256,0,0,0},SetWinFileListPalette_1080P};
            //Create Menu Window -- 1
            pNewControl = AWCreateWinControl("TWindow","WinFileList_1080P",WS_OVERLAPPEDWINDOW,
		                      0,0,1920,1080,NULL, (INT32S)&window_para1080p,WinFileListMsgProc_1080P) ;
            pNewControl->win_id = 0 ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileListBKGPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 0;
            pControl->winrect.left = pControl->parent->winrect.left + 0;
            pControl->winrect.width = 1920-FILE_X_OFFSET;
            pControl->winrect.height = 1080-FILE_Y_OFFSET;
            pControl->draw_info_num = 9;
            RECT DrawRect1080p[9] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,1920-FILE_X_OFFSET,1080-FILE_Y_OFFSET},
            {pControl->winrect.left + 0,pControl->winrect.top + 0,265,145},
            {pControl->winrect.left + 128,pControl->winrect.top + 220,50,43},
            {pControl->winrect.left + 128,pControl->winrect.top + 653,50,43},
            {pControl->winrect.left + 128,pControl->winrect.top + 150,633,68},
            {pControl->winrect.left + 138,pControl->winrect.top + 158,633,68},
            {pControl->winrect.left + 580,pControl->winrect.top + 32,74,46},
            {pControl->winrect.left + 120,pControl->winrect.top + 720,1250,38},
            {pControl->winrect.left + 120,pControl->winrect.top + 720,1250,38},
            };
            for(iLoop=0; iLoop < 9; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileListBKGMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileListBKGOnShow(hwnd, lpParam) ;
        case WM_PAINT:
            return WinFileListBKGOnPaint(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileListBKG_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileListBKG
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileListBKG_1080P",(WS_CHILDWINDOW | WS_CHILDWINDOW),
		                      0,0,1920-FILE_X_OFFSET,1080-FILE_Y_OFFSET,pParent,0,WinFileListBKGMsgProc_1080P) ;
            pNewControl->win_id = 4 ;
            pNewControl->draw_info_num = 9;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[9] = {
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_FILE_TOP,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_PATH_BLANK,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
	                      {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
			              {0,0,0,0,(INT32U)ICON_TIP_BLANK,DT_RLE_BMP_DATA},//tip for copy
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA}};
		  
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetFileListPreviewPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop ;
    if(strcmp(pControl->pClass->class_name, "TFilelist"))
        return ;
    TFILELIST *pList = (TFILELIST *)pControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + (215);
            pControl->winrect.left = pControl->parent->winrect.left + (172);
            pControl->winrect.width = (573);
            pControl->winrect.height = (476);
            pControl->draw_info_num = 0;
            RECT DrawRect1080p[0] = {
            };
            for(iLoop=0; iLoop < 0; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            pList->filelist_bmp_start_x = (10);
            pList->filelist_bmp_start_y = (0);
            pList->filelist_title_start_x = (64);
            pList->filelist_title_start_y = (14);
            pList->filelist_hint_info.draw_pos_x = pControl->winrect.left + (0);
            pList->filelist_hint_info.draw_pos_y  = pControl->winrect.top + (0);
            pList->filelist_hint_info.draw_width = (0);
            pList->filelist_hint_info.draw_height = (0);
            pList->list_up_arrow_info.draw_pos_x = pControl->winrect.left + (0);
            pList->list_up_arrow_info.draw_pos_y  = pControl->winrect.top ; 
            pList->list_up_arrow_info.draw_width = pControl->winrect.width + pList->list_up_arrow_info.draw_pos_x - pControl->winrect.left;
            pList->list_up_arrow_info.draw_height = (0);
            pList->list_down_arrow_info.draw_pos_x = pList->list_up_arrow_info.draw_pos_x;
            pList->list_down_arrow_info.draw_pos_y  = pControl->winrect.top + pControl->winrect.height - pList->list_up_arrow_info.draw_height; 
            pList->list_down_arrow_info.draw_width = pList->list_up_arrow_info.draw_width ;
            pList->list_down_arrow_info.draw_height = pList->list_up_arrow_info.draw_height;
            break ;
    }//end of switch
    return;
}

INT32S FileListPreviewMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return FileListPreviewOnShow(hwnd, lpParam) ;
        case WM_PAINT:
            return FileListPreviewOnPaint(hwnd, lpParam) ;
        case WM_KEYDOWN:
            return FileListPreviewOnKeyPress(hwnd, lpParam) ;
        default:
            return FileListPreviewOnOtherEvent(hwnd, msg_type, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlFileListPreview_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- FileListPreview
    HWND *pNewControl;
    TFILELIST *pList;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TFilelist","FileListPreview_1080P",(WS_CHILDWINDOW | WS_CHILDWINDOW),
		                      172,230,573,476,pParent, 7, FileListPreviewMsgProc_1080P) ;
            pNewControl->win_id = 3 ;
            pNewControl->draw_info_num = 0;
            pList = (TFILELIST *)pNewControl;
            TFILELIST FileList1080P = {{}, 0,
                          7,0,0,0,0,
                          (INT32U)ICON_FILELIST_BAR_LOSE,
                          (INT32U)ICON_FILELIST_BAR_FOCUS,
                          (INT32U)ICON_FILELIST_BAR_LOSE,
                          (INT32U)ICON_FILELIST_BAR_FOCUS,
                          (INT32U)ICON_FILELIST_BAR_FOCUS,
                          (INT32U)ICON_FILELIST_BAR_FOCUS,
                          (INT32U)ICON_FILELIST_BAR_FOCUS,
                          (INT32U)ICON_FILELIST_BAR_LOSE_PICKED,
                          (INT32U)ICON_FILELIST_BAR_FOCUS_PICKED,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          0,0,0,0,
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                           NULL,
                           GetNextFileListCB,
                           GetPrevFileListCB,
                           CDNewDir,
                           GetFullName,
                           CDRootDir};
            FileList1080P.filelist_items = pList->filelist_items ;
            FileList1080P.hwnd = pList->hwnd ;
            *pList =FileList1080P;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileInfoBKGPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 146;
            pControl->winrect.left = pControl->parent->winrect.left + 636+130;
            pControl->winrect.width = 653;
            pControl->winrect.height = 583;
            pControl->draw_info_num = 8;
            RECT DrawRect1080p[8] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,653,583},
            {pControl->winrect.left + 30,pControl->winrect.top + 100,400,50},
            {pControl->winrect.left + 30,pControl->winrect.top + 200,400,50},//filesize	
            {pControl->winrect.left + 30,pControl->winrect.top + 150,400,50},//filetype	moveup
            {pControl->winrect.left + 30,pControl->winrect.top + 250,400,50},
            {pControl->winrect.left + 30,pControl->winrect.top + 300,400,50},
            {pControl->winrect.left + 30,pControl->winrect.top + 350,400,50},            
            {pControl->winrect.left + 30,pControl->winrect.top + 400,400,50},
            };
            for(iLoop=0; iLoop < 8; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileInfoBKGMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileInfoBKGOnShow(hwnd, lpParam) ;
        case WM_HIDEWINDOW:
            return WinFileInfoBKGOnHide(hwnd, lpParam) ;
        case WM_PAINT:
            return WinFileInfoBKGOnPaint(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileInfoBKG_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileInfoBKG
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileInfoBKG_1080P",(WS_CHILDWINDOW | WS_CHILDWINDOW),
		                      636,146,653,583,pParent,0,WinFileInfoBKGMsgProc_1080P) ;
            pNewControl->win_id = 3 ;
            pNewControl->draw_info_num = 8;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[8] = {
                          {0,0,0,0,(INT32U)ICON_FILELIST_INFO_BLANK,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},                          
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},                          
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          };
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileMusicBKGPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 146;
            pControl->winrect.left = pControl->parent->winrect.left + 636+130;
            pControl->winrect.width = 653;
            pControl->winrect.height = 583;
            pControl->draw_info_num = 1;
            RECT DrawRect1080p[1] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,653,583},
            };
            for(iLoop=0; iLoop < 1; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileMusicBKGMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileMusicBKGOnShow(hwnd, lpParam) ;
        case WM_PAINT:
            return WinFileMusicBKGOnPaint(hwnd, lpParam) ;
        case WM_KEYDOWN:
            return WinFileMusicBKGOnKeyPress(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileMusicBKG_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileMusicBKG
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileMusicBKG_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      636,146,653,583,pParent,0,WinFileMusicBKGMsgProc_1080P) ;
            pNewControl->win_id = 6 ;
            pNewControl->draw_info_num = 1;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[1] = {
                          {0,0,0,0,(INT32U)ICON_FILELIST_MUSIC_BACKGROUND,DT_RLE_BMP_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileSpectrumPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 168+6;
            pControl->winrect.left = pControl->parent->winrect.left + 666+130;
            pControl->winrect.width = 318;
            pControl->winrect.height = 188;
            pControl->draw_info_num = 17;
            RECT DrawRect1080p[17] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,318,188},
            {pControl->winrect.left + 0,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 18,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 36,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 54,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 72,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 90,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 108,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 126,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 144,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 162,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 180,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 198,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 216,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 234,pControl->winrect.top + 0,18,188},
            {pControl->winrect.left + 0,pControl->winrect.top + 0,0,0},
            {pControl->winrect.left + 0,pControl->winrect.top + 0,0,0},
            };
            for(iLoop=0; iLoop < 17; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileSpectrumMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileSpectrumOnShow(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileSpectrum_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileSpectrum
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileSpectrum_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      666,168,318,188,pParent,0,WinFileSpectrumMsgProc_1080P) ;
            pNewControl->win_id = 7 ;
            pNewControl->draw_info_num = 17;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[17] = {
                          {0,0,0,0,(INT32U)ICON_MUSIC_SPECTRUM_BK,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileVolumePos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 62+FILE_Y_OFFSET;
            pControl->winrect.left = pControl->parent->winrect.left + 988+FILE_X_OFFSET;
            pControl->winrect.width = 130;
            pControl->winrect.height = 85;
            pControl->draw_info_num = 2;
            RECT DrawRect1080p[2] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,110,85},
            {pControl->winrect.left + 110,pControl->winrect.top + 0,53,85},
            };
            for(iLoop=0; iLoop < 2; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileVolumeMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileVolumeOnShow(hwnd, lpParam) ;
        case WM_PAINT:
            return WinFileVolumeOnPaint(hwnd, lpParam) ;
        case WM_KEYDOWN:
            return WinFileVolumeOnKeyPress(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileVolume_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileVolume
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileVolume_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      988,62,130,85,pParent,0,WinFileVolumeMsgProc_1080P) ;
            pNewControl->win_id = 8 ;
            pNewControl->draw_info_num = 2;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[2] = {
                          {0,0,0,0,(INT32U)ICON_SPEAKER,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_VOLUME0,DT_RLE_BMP_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileListProcessBarPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 336+48;
            pControl->winrect.left = pControl->parent->winrect.left + 636+130;
            pControl->winrect.width = 516;
            pControl->winrect.height = 78;
            pControl->draw_info_num = 6;
            RECT DrawRect1080p[6] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,513,78},
            {pControl->winrect.left + 36,pControl->winrect.top + 5,70,58},
            {pControl->winrect.left + 513,pControl->winrect.top + 0,133,78},
            {pControl->winrect.left + 519,pControl->winrect.top + 20,96,46},
            {pControl->winrect.left + 92,pControl->winrect.top + 5,70,58},
            {pControl->winrect.left + 166+41,pControl->winrect.top + 30,295,13},
            };
            for(iLoop=0; iLoop < 6; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileListProcessBarMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileListProcessBarOnShow(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileListProcessBar_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileListProcessBar
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileListProcessBar_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      636,336,516,78,pParent,0,WinFileListProcessBarMsgProc_1080P) ;
            pNewControl->win_id = 9 ;
            pNewControl->draw_info_num = 6;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[6] = {
                          {0,0,0,0,(INT32U)ICON_MUSIC_PLAY_BAR,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_INFO_PLAY,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_MUSIC_TIME_BLANK,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)mediabox_time_str,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)ICON_INFO_BLANK,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_MUSIC_PROCESSBAR_BLANK,DT_RLE_BMP_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileListMusicInfoPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 398+110;
            pControl->winrect.left = pControl->parent->winrect.left + 636+130;
            pControl->winrect.width = 653;
            pControl->winrect.height = 268;
            pControl->draw_info_num = 5;
            RECT DrawRect1080p[5] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,653,268},
            {pControl->winrect.left + 26,pControl->winrect.top + 20,500,40},
            {pControl->winrect.left + 26,pControl->winrect.top + 60,500,40},
            {pControl->winrect.left + 26,pControl->winrect.top + 100,500,40},
            {pControl->winrect.left + 26,pControl->winrect.top + 140,500,40},
            };
            for(iLoop=0; iLoop < 5; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

HWND *CreateControlWinFileListMusicInfo_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileListMusicInfo
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileListMusicInfo_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      636,398,522,214,pParent,0,NULL) ;
            pNewControl->win_id = 10 ;
            pNewControl->draw_info_num = 5;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[5] = {
                          {0,0,0,0,(INT32U)ICON_MUSIC_INFO_BLANK,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)debug_string[0],DT_STRING_DATA},
                          {0,0,0,0,(INT32U)debug_string[1],DT_STRING_DATA},
                          {0,0,0,0,(INT32U)debug_string[2],DT_STRING_DATA},
                          {0,0,0,0,(INT32U)debug_string[3],DT_STRING_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileListUpgradePos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 188;
            pControl->winrect.left = pControl->parent->winrect.left + 664;
            pControl->winrect.width = 474;
            pControl->winrect.height = 290;
            pControl->draw_info_num = 10;
            RECT DrawRect1080p[10] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,474,290},
            {pControl->winrect.left + 32,pControl->winrect.top + 40,390,40},
            {pControl->winrect.left + 32,pControl->winrect.top + 80,390,40},
            {pControl->winrect.left + 32,pControl->winrect.top + 120,390,40},//UpgradeInfo
            {pControl->winrect.left + 26,pControl->winrect.top + 204,196,66},
            {pControl->winrect.left + 248,pControl->winrect.top + 204,196,66},
            {pControl->winrect.left + 32,pControl->winrect.top + 120,390,40},            
            {pControl->winrect.left + 22,pControl->winrect.top + 200,437,78},
            {pControl->winrect.left + 32,pControl->winrect.top + 70,390,40},
            {pControl->winrect.left + 32,pControl->winrect.top + 100,390,40},
            };
            for(iLoop=0; iLoop < 10; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}
INT32S WinFileListUpgradeMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileListUpgradeOnShow(hwnd, lpParam) ;
        case WM_PAINT:
            return WinFileListUpgradeOnPaint(hwnd, lpParam) ;
        case WM_KEYDOWN:
            return WinFileListUpgradeOnKeyPress(hwnd, lpParam) ;
    }
    return 0 ;
}
extern char UPGRADEFILE_STR[20];

extern char upgrade_swVersion_str[];
extern char upgrade_swBuildDate_str[];
extern unsigned int upgrade_platformID;



HWND *CreateControlWinFileListUpgrade_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileListUpgrade
    
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileListUpgrade_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      664,188,474,290,pParent,0,WinFileListUpgradeMsgProc_1080P) ;
            pNewControl->win_id = 11 ;
            pNewControl->draw_info_num = 10;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[10] = {
                          {0,0,0,0,(INT32U)ICON_UPGRADE_BACKGROUND,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)upgrade_model,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},             //UPGRADEFILE_STR
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},             //UpgradeInfo
                          {0,0,0,0,(INT32U)ICON_YES_LOSE,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)ICON_NO_FOCUS,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},            //ICON_UPGRADE_BLANK
   			    		  {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},             //ICON_UPGRADE_PERCENT_INFOBAR		  
                          {0,0,0,0,(INT32U)upgrade_swVersion_str,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)upgrade_swBuildDate_str,DT_STRING_DATA},
			}; 
			
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileListCopyDelBKGPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 158;
            pControl->winrect.left = pControl->parent->winrect.left + 646+130;
            pControl->winrect.width = 630;
            pControl->winrect.height = 565;
            pControl->draw_info_num = 27;
            RECT DrawRect1080p[27] = {
            {pControl->winrect.left + 0,pControl->winrect.top + 0,630,565},
            {pControl->winrect.left + 66,pControl->winrect.top + 60,380,44},
            {pControl->winrect.left + 66,pControl->winrect.top + 110,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 66,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 116,380,44},
            {pControl->winrect.left + 66,pControl->winrect.top + 60,380,44},
            {pControl->winrect.left + 66,pControl->winrect.top + 110,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 66,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 116,380,44},
            {pControl->winrect.left + 18,pControl->winrect.top + 20,472,290},
            {pControl->winrect.left + 18,pControl->winrect.top + 360,472,74},
            {pControl->winrect.left + 18,pControl->winrect.top + 20+30,472,382},
            {pControl->winrect.left + 66,pControl->winrect.top + 110,380,44},
            {pControl->winrect.left + 66,pControl->winrect.top + 160,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 116,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 166,380,44},
            {pControl->winrect.left + 166,pControl->winrect.top + 300,200,66},
            {pControl->winrect.left + 230,pControl->winrect.top + 316,200,66},
            {pControl->winrect.left + 18,pControl->winrect.top + 154+30,472,290},
            {pControl->winrect.left + 230,pControl->winrect.top + 170+30,40,34},
            {pControl->winrect.left + 230,pControl->winrect.top + 392+30,40,34},
            {pControl->winrect.left + 166,pControl->winrect.top + 220+30,200,66},
            {pControl->winrect.left + 230,pControl->winrect.top + 236+30,200,66},
            {pControl->winrect.left + 40,pControl->winrect.top + 300+30,196,66},
            {pControl->winrect.left + 294,pControl->winrect.top + 300+30,196,66},
            {pControl->winrect.left + 70,pControl->winrect.top + 66+30,380,44},
            {pControl->winrect.left + 70,pControl->winrect.top + 116+30,380,44},
            };
            for(iLoop=0; iLoop < 27; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

INT32S WinFileListCopyDelBKGMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_PAINT:
            return WinFileListCopyDelBKGOnPaint(hwnd, lpParam) ;
        case WM_KEYDOWN:
            return WinFileListCopyDelBKGOnKeyPress(hwnd, lpParam) ;
	 default : 
 	     return WinFileListCopyDelBKGOnOtherEvent(hwnd, msg_type, lpParam) ;
		 
    }
    return 0 ;
}

HWND *CreateControlWinFileListCopyDelBKG_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileListCopyDelBKG
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","WinFileListCopyDelBKG_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      650+130,158,630,565,pParent,0,WinFileListCopyDelBKGMsgProc_1080P) ;
            pNewControl->win_id = 12 ;
            pNewControl->draw_info_num = 27;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[27] = {
                          {0,0,0,0,(INT32U)ICON_COPYDEL_BKG,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA},
                          {0,0,0,0,(INT32U)0,DT_STRING_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

void SetWinFileListCopyDelPos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop ;
    if(strcmp(pControl->pClass->class_name, "TFilelist"))
        return ;
    TFILELIST *pList = (TFILELIST *)pControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + (370+30);
            pControl->winrect.left = pControl->parent->winrect.left + (716+130);
            pControl->winrect.width = (475);
            pControl->winrect.height = (176);
            pControl->draw_info_num = 0;
            RECT DrawRect1080p[0] = {
            };
            for(iLoop=0; iLoop < 0; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            pList->filelist_bmp_start_x = (0);
            pList->filelist_bmp_start_y = (0);
            pList->filelist_title_start_x = (4);
            pList->filelist_title_start_y = (4);
            pList->filelist_hint_info.draw_pos_x = pControl->winrect.left + (0);
            pList->filelist_hint_info.draw_pos_y  = pControl->winrect.top + (0);
            pList->filelist_hint_info.draw_width = (0);
            pList->filelist_hint_info.draw_height = (0);
            pList->list_up_arrow_info.draw_pos_x = pControl->winrect.left + (0);
            pList->list_up_arrow_info.draw_pos_y  = pControl->winrect.top ; 
            pList->list_up_arrow_info.draw_width = pControl->winrect.width + pList->list_up_arrow_info.draw_pos_x - pControl->winrect.left;
            pList->list_up_arrow_info.draw_height = (0);
            pList->list_down_arrow_info.draw_pos_x = pList->list_up_arrow_info.draw_pos_x;
            pList->list_down_arrow_info.draw_pos_y  = pControl->winrect.top + pControl->winrect.height - pList->list_up_arrow_info.draw_height; 
            pList->list_down_arrow_info.draw_width = pList->list_up_arrow_info.draw_width ;
            pList->list_down_arrow_info.draw_height = pList->list_up_arrow_info.draw_height;
            break ;
    }//end of switch
    return;
}

INT32S WinFileListCopyDelMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
        case WM_SHOWWINDOW:
            return WinFileListCopyDelOnShow(hwnd, lpParam) ;
        case WM_PAINT:
            return WinFileListCopyDelOnPaint(hwnd, lpParam) ;
        case WM_KEYDOWN:
            return WinFileListCopyDelOnKeyPress(hwnd, lpParam) ;
    }
    return 0 ;
}

HWND *CreateControlWinFileListCopyDel_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- WinFileListCopyDel
    HWND *pNewControl;
    TFILELIST *pList;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TFilelist","WinFileListCopyDel_1080P",(WS_CHILDWINDOW | WS_DISVISIBLE),
		                      716+130,370+30,475,176,pParent, 4, WinFileListCopyDelMsgProc_1080P) ;
            pNewControl->win_id = 15 ;
            pNewControl->draw_info_num = 0;
            pList = (TFILELIST *)pNewControl;
            TFILELIST FileList1080P = {{}, 0,
                          4,0,0,0,14,
                          (INT32U)ICON_COPYDEL_LOSE,
                          (INT32U)ICON_COPYDEL_FOCUS,
                          (INT32U)ICON_COPYDEL_LOSE,
                          (INT32U)ICON_COPYDEL_FOCUS,
                          (INT32U)ICON_COPYDEL_FOCUS,
                          (INT32U)ICON_COPYDEL_FOCUS,
                          (INT32U)ICON_COPYDEL_FOCUS,
                          (INT32U)ICON_COPYDEL_LOSE,
                          (INT32U)ICON_COPYDEL_FOCUS,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          DT_RLE_BMP_DATA,
                          0,0,0,0,
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RLE_BMP_DATA},
                          {0,0,0,0,(INT32U)0,DT_RESOURCE_STRING_DATA},
                           NULL,
                           GetNextFileListCB,
                           GetPrevFileListCB,
                           CDNewDir,
                           GetFullName,
                           CDRootDir_OnlyDir};
            FileList1080P.filelist_items = pList->filelist_items ;
            FileList1080P.hwnd = pList->hwnd ;
            *pList =FileList1080P;
            break ;
    }//end of switch
            return pNewControl;
}

INT32S StringRotateMsgProc_1080P(PHWND hwnd, INT32U msg_type, INT32S lpParam)
{
    switch( msg_type){
		case WM_SHOWWINDOW:
			//return StringRotateOnShow(hwnd, lpParam) ;

		case WM_PAINT:
			//return StringRotateOnPaint(hwnd, lpParam);
		break;
			default:
		break;
    }
    return 0 ;
}

void SetStringRotatePos_1080P(HWND* pControl, INT8U CurOsdSize)
{
    int iLoop;
    switch(CurOsdSize){
	case OsdSize1080p:
            pControl->winrect.top = pControl->parent->winrect.top + 0;
            pControl->winrect.left = pControl->parent->winrect.left + 5;
            pControl->winrect.width = 493;
            pControl->winrect.height = 63;
            pControl->draw_info_num = 2;
            RECT DrawRect1080p[2] = {
            {pControl->winrect.left + 5,pControl->winrect.top + 0,493,63},
            {pControl->winrect.left + 0,pControl->winrect.top + 0,330,50},
            };
            for(iLoop=0; iLoop < 2; iLoop++)
                memcpy(&(pControl->draw_info[iLoop]), &DrawRect1080p[iLoop], sizeof(RECT));
            break ;
    }//end of switch
    return;
}

HWND *CreateControlStringRotate_1080P(HWND *pParent,INT8U CurOsdSize)
{
    //Create Control -- StringRotate
    HWND *pNewControl;
    switch(CurOsdSize){
	case OsdSize1080p:
            pNewControl = AWCreateWinControl("TControl","StringRotate_1080P",(WS_CHILDWINDOW | WS_CHILDWINDOW),
		                      5,0,493,63,pParent,0,StringRotateMsgProc_1080P) ;
            pNewControl->win_id = 5 ;
            pNewControl->draw_info_num = 2;
            pNewControl->draw_info = (PDRAWINFO)AVMem_umalloc(sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            DRAWINFO DrawDatas1080p[2] = {
            			  {5,0,493,63,(INT32U)0,DT_RLE_BMP_DATA},
                              {0,0,330,50,(INT32U)0,DT_VOSD_DATA}};
            memcpy(pNewControl->draw_info,DrawDatas1080p, sizeof(DRAWINFO) * pNewControl->draw_info_num) ;
            break ;
    }//end of switch
            return pNewControl;
}

HWND* CreateMenuWinFileList_1080P(void)
{
    HWND *pNewControl ;
    TWINDOWS *pWin;
    HWND *pWinFileList = CreateControlWinFileList_1080P(NULL,CurrentOsdSize);
    SetWinFileListPos_1080P(pWinFileList,CurrentOsdSize);

    pNewControl= CreateControlFileListPreview_1080P(pWinFileList,CurrentOsdSize);
    SetFileListPreviewPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileInfoBKG_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileInfoBKGPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileListBKG_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileListBKGPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlStringRotate_1080P(pWinFileList,CurrentOsdSize);
    SetStringRotatePos_1080P(pNewControl,CurrentOsdSize);  	

    pNewControl= CreateControlWinFileMusicBKG_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileMusicBKGPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileSpectrum_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileSpectrumPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileVolume_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileVolumePos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileListProcessBar_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileListProcessBarPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileListMusicInfo_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileListMusicInfoPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileListUpgrade_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileListUpgradePos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileListCopyDelBKG_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileListCopyDelBKGPos_1080P(pNewControl,CurrentOsdSize);

    pNewControl= CreateControlWinFileListCopyDel_1080P(pWinFileList,CurrentOsdSize);
    SetWinFileListCopyDelPos_1080P(pNewControl,CurrentOsdSize);

    pWin = (TWINDOWS *)pWinFileList;
    pWin->pFocusControl = AWFindWinCtrlByName("FileListPreview_1080P");
    return pWinFileList;
}

void WinResetWinFileListControlsPos_1080P(HWND *pControl, INT8U CurOsdSize)
{
    switch(pControl->win_id){
        case 0://WinFileList
            SetWinFileListPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 2://FileListPreview
            SetFileListPreviewPos_1080P(pControl,CurOsdSize) ;
            break ;	
        case 3://WinFileInfoBKG
            SetWinFileInfoBKGPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 4://WinFileListBKG
            SetWinFileListBKGPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 5://StringRotate
            SetStringRotatePos_1080P(pControl,CurOsdSize) ;            
            break ;    
        case 6://WinFileMusicBKG
            SetWinFileMusicBKGPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 7://WinFileSpectrum
            SetWinFileSpectrumPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 8://WinFileVolume
            SetWinFileVolumePos_1080P(pControl,CurOsdSize) ;
            break ;
        case 9://WinFileListProcessBar
            SetWinFileListProcessBarPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 10://WinFileListMusicInfo
            SetWinFileListMusicInfoPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 11://WinFileListUpgrade
            SetWinFileListUpgradePos_1080P(pControl,CurOsdSize) ;
            break ;
        case 12://WinFileListCopyDelBKG
            SetWinFileListCopyDelBKGPos_1080P(pControl,CurOsdSize) ;
            break ;
        case 15://WinFileListCopyDel
            SetWinFileListCopyDelPos_1080P(pControl,CurOsdSize) ;
            break ;
    }//end of switch
}
void WinResetWinFileListPos_1080P(HWND *pControl, INT8U CurOsdSize)
{
    HWND *pChildControl;
    if(pControl == NULL)
        pControl = AWFindWinCtrlByName("WinFileList_1080P");
    if(pControl == NULL) return ;

    WinResetWinFileListControlsPos_1080P(pControl, CurOsdSize) ;
    pChildControl = pControl->children ;
    while(pChildControl != NULL){
    	WinResetWinFileListPos_1080P(pChildControl, CurOsdSize) ;
    	pChildControl = pChildControl->siblings ;
	}
	return ;
}

